<template>
  <div class="home-container">
    <el-card class="welcome-card">
      <template #header>
        <div class="card-header">
          <h1>视频处理工具</h1>
        </div>
      </template>

      <div class="welcome-content">
        <p>欢迎使用视频处理工具，本工具提供以下功能：</p>

        <el-row :gutter="20" class="feature-cards">
          <el-col :span="8">
            <el-card class="feature-card" @click="navigateTo('/classification')">
              <template #header>
                <div class="feature-header">
                  <h2>视频分类</h2>
                </div>
              </template>
              <div class="feature-description">
                <p>自动分析并分类视频内容，支持水印检测、广告识别和内容翻译。</p>
              </div>
            </el-card>
          </el-col>

          <el-col :span="8">
            <el-card class="feature-card" @click="navigateTo('/merge')">
              <template #header>
                <div class="feature-header">
                  <h2>视频混搭</h2>
                </div>
              </template>
              <div class="feature-description">
                <p>根据关键词和分类搜索视频并自动生成混合视频。</p>
              </div>
            </el-card>
          </el-col>

          <el-col :span="8">
            <el-card class="feature-card" @click="navigateTo('/copywriting')">
              <template #header>
                <div class="feature-header">
                  <h2>文案处理</h2>
                </div>
              </template>
              <div class="feature-description">
                <p>从视频中提取文本并生成专业文案，支持批量处理和Excel导出。</p>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </div>
    </el-card>
  </div>
</template>

<script>
import { useRouter } from 'vue-router';

export default {
  name: 'HomeView',
  setup() {
    const router = useRouter();

    const navigateTo = (path) => {
      router.push(path);
    };

    return {
      navigateTo
    };
  }
};
</script>

<style scoped>
.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.welcome-card {
  margin-bottom: 30px;
}

.card-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.welcome-content {
  text-align: center;
  margin-bottom: 30px;
}

.feature-cards {
  margin-top: 40px;
}

.feature-card {
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-header {
  text-align: center;
}

.feature-description {
  padding: 10px;
}
</style>